# import re
# text = '博主讲的实在是太1165872335@数加$.com好了，通俗易懂，已三连，求课件，我的邮箱是 1165872335@qq.com 或' \
#        '者是xiaohu2023666@pronton.com谢谢博主 手xiaohu2机微信号也可以17354074069'
# res = re.findall(r'([a-z0-9]+@(数加\$|qq|pronton)\.com)',text)
# print(res)  # [('博主讲的实在是太1165872335@数加$.com', '数加$'), ('1165872335@qq.com', 'qq'), ('或者是xiaohu2023666@pronton.com', 'pronton')]
#
# text = '1165872335@qq.com'
# res = re.findall(r'^1\d+@\w+\.com$', text)
# print(res)

import re
# text = '博主讲的实在是太1165872335@数加$.com好了，通俗易懂，已三连，求课件，我的邮箱是 1165872335@qq.com 或' \
#        '者是xiaohu2023666@pronton.com谢谢博主 手xiaohu2机微信号也可以17354074069'

# res2 = re.findall('(\w+@(数加\$|qq|pronton)\.com)',text, re.ASCII)
# print(res2) # [('1165872335@数加$.com', '数加$'), ('1165872335@qq.com', 'qq'), ('xiaohu2023666@pronton.com', 'pronton')]
#
# res1 = re.finditer('(\w+@(数加\$|qq|pronton)\.com)',text, re.ASCII)
# for res in res1:
#     print(res.group(1))
#     print(res.group(2))
#     print("-----------------------")

text = '安徽省-合肥市-蜀山区-浮山路'

res1 = re.fullmatch(f'(\w+)-(\w+)-(\w+)-(\w+)', text)
print(f"省份:{res1.group(1)}")
print(f"市:{res1.group(2)}")
print(f"区:{res1.group(3)}")
print(f"街道:{res1.group(4)}")
